package com.allinpay.merchantweb.request;
/**
 * 请求报文
 *@date 2018-03-11
 */

import java.util.Date;


import org.springframework.stereotype.Component;

import com.allinpay.merchantweb.common.utils.DateUtil;
import com.allinpay.merchantweb.common.utils.StringUtil;

@Component
public class RequestMessage {
	
	/**
	 * 通联分配给开发者的应用ID       
	 */
	private String appId		;    
	/**
	 * 发送请求的时间，格式"yyyy-MM-dd HH:mm:ss"       
	 */
	private String timestamp    ;                   
	
	/**
	 * 调用的接口版本                        
	 */
	
	private String version  ="1.0"    ;            
	
	private String reqSsn;    
	
	/**
	 * 请求参数的集合，最大长度不限，除公共参数外所有请求参数都必须放在这个参数中传递
	 */
	private String bizContent;
	
	private String sessionid;

	
	public String getRequestParam() {
		
		
         StringBuffer bufSignSrc = new StringBuffer();
         StringUtil.appendSignPara(bufSignSrc, "appId", this.appId);
         StringUtil.appendSignPara(bufSignSrc, "reqSsn", this.reqSsn);
         StringUtil.appendSignPara(bufSignSrc, "timestamp", DateUtil.format(new Date(), DateUtil.datePattern));
         StringUtil.appendSignPara(bufSignSrc, "version", this.version);
         StringUtil.appendSignPara(bufSignSrc, "bizContent", "{biz_content}");
		
        return bufSignSrc.toString();
	}
	
	
	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	

	

	public String getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(String timestamp) {
		this.timestamp = timestamp;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	

	public String getReqSsn() {
		return reqSsn;
	}


	public void setReqSsn(String reqSsn) {
		this.reqSsn = reqSsn;
	}


	public String getBizContent() {
		return bizContent;
	}

	public void setBizContent(String bizContent) {
		this.bizContent = bizContent;
	}


	public String getSessionid() {
		return sessionid;
	}


	public void setSessionid(String sessionid) {
		this.sessionid = sessionid;
	}
	
	

}
